import 'package:elephant_fish/model/anchor.dart';
import 'package:elephant_fish/model/rank_entity.dart';
import 'package:elephant_fish/util/size_util.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class CharmRankList extends StatelessWidget {
  final Arr anchor;
  const CharmRankList({Key key, this.anchor}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Stack(
      children: [
        Align(
          alignment: Alignment.topLeft,
          child: Padding(padding: EdgeInsets.only(left: SizeUtil.px(35),top: SizeUtil.px(45)),
            child:  Text(
              anchor.level.toString(),
              style: TextStyle(
                fontSize: SizeUtil.px(28),color: Color(0xffff5784)
              ),
            )
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child: Padding(padding: EdgeInsets.only(left: SizeUtil.px(87),top: SizeUtil.px(24)),
            child:  CircleAvatar(
              radius: SizeUtil.px(35),
              backgroundImage: NetworkImage('http://119.28.131.94:82' + anchor.avatar),
              child: Container(
                width: SizeUtil.px(70),
                height: SizeUtil.px(70),
              ),
            ),
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child:  Padding(padding: EdgeInsets.only(left: SizeUtil.px(173)),
              child:Stack(
                children: [
                  Align(
                    alignment: Alignment.topLeft,
                    child: Padding(padding: EdgeInsets.only(top: SizeUtil.px(26)),
                      child:   Text(
                        anchor.nickname,
                        style: TextStyle(fontSize: SizeUtil.px(30),color: Color(0xfff3f3f3)),
                      ),
                    ),
                  ),
                  Align(
                    alignment: Alignment.topLeft,
                    child:   Padding(padding: EdgeInsets.only(top: SizeUtil.px(70) ),
                      child:  Text(
                        'ID:' + anchor.idNumber.toString(),
                        style: TextStyle(fontSize: SizeUtil.px(30),color: Color(0xfffe4b53)),
                      ),
                    ),
                  ),
                ],
              )
          ),
        ),
        Align(
          alignment: Alignment.topLeft,
          child: Padding(
            padding: EdgeInsets.only(top: SizeUtil.px(121)),
            child: Divider(
              height: SizeUtil.px(1),
              indent: SizeUtil.px(86),
              color: Color(0xfff3f3f3),
            ),
          ),
        ),
        // Align(
        //   alignment: Alignment.topRight,
        //   child: Padding(
        //     padding: EdgeInsets.only(right: SizeUtil.px(24),top: SizeUtil.px(40)),
        //     child: Container(
        //       width: SizeUtil.px(106),
        //       child: InkWell(
        //         child: Image.asset('assets/images/follow.png'),
        //         onTap: (){
        //           print("关注");
        //         },
        //       ),
        //     ),
        //   ),
        // )



      ],
    );
  }
}
